package com.hopu.service.Impl;

import com.hopu.mapper.DeptMapper;
import com.hopu.pojo.Dept;
import com.hopu.service.DeptService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {
    @Resource
    private DeptMapper deptMapper;
    @Override
    public List<Dept> findAllDept(int pflag) {
        return deptMapper.findAllDept(pflag);
    }

    @Override
    public int addPart(String pname,String premark) {
        return deptMapper.addPart(pname,premark);
    }

    @Override
    public Dept findPart(String pname, Integer pid) {
        return deptMapper.findPart(pname,pid);
    }

    @Override
    public int delPart(int pid) {
        return deptMapper.delPart(pid);
    }

    @Override
    public int updatePart(int pid,String pname,String premark) {
        return deptMapper.updatePart(pid,pname,premark);
    }

    @Override
    public int huiFuPart(int pid) {
        return deptMapper.huiFuPart(pid);
    }

    @Override
    public Dept findPartByCondition(String pname, int pid) {
        return deptMapper.findPartByCondition(pname,pid);
    }

    @Override
    public List<Dept> findAllPart() {
        return deptMapper.findAllPart();
    }
}
